Conditions | 4 |
Total Lines | 23 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | // NB COPYPASTE!1 |
||
4 | function main() { |
||
5 | const {env} = process |
||
6 | , collected = {} |
||
7 | , keys = [] |
||
8 | |||
9 | for (const key in env) { |
||
10 | if (!key.includes("SPEC_")) |
||
11 | continue |
||
12 | |||
13 | collected[key] = env[key] |
||
14 | keys.push(key) |
||
15 | } |
||
16 | |||
17 | const {length} = keys.sort() |
||
18 | , $return = {} |
||
19 | |||
20 | for (let i = 0; i < length; i++) { |
||
21 | const key = keys[i] |
||
22 | $return[key] = collected[key] |
||
23 | } |
||
24 | |||
25 | return $return |
||
26 | } |
||
27 |